// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_COMPANY
// * CreateDate    : 2014-06-05 18:30:14
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:14
// * LastChanger   : 2014-06-05 18:30:14
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstCompanyEntity : EntityBase
    {
        public MstCompanyTable TableSchema
        {
            get
            {
                return MstCompanyTable.Current;
            }
		}
		
		public MstCompanyEntity()
        {

        }
		
		public MstCompanyEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CompanyCode = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_CODE"]));
			this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
			this.NameEnglish = Convert.ToString(CommonFunctions.ToObject(dr["NAME_ENGLISH"]));
			this.LegalPerson = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_PERSON"]));
			this.Mp = Convert.ToString(CommonFunctions.ToObject(dr["MP"]));
			this.Tel = Convert.ToString(CommonFunctions.ToObject(dr["TEL"]));
			this.Fax = Convert.ToString(CommonFunctions.ToObject(dr["FAX"]));
			this.Add = Convert.ToString(CommonFunctions.ToObject(dr["ADD"]));
			this.Pc = Convert.ToString(CommonFunctions.ToObject(dr["PC"]));
			this.Web = Convert.ToString(CommonFunctions.ToObject(dr["WEB"]));
			this.Email = Convert.ToString(CommonFunctions.ToObject(dr["EMAIL"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public MstCompanyEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CompanyCode = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_CODE"]));
			this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
			this.NameEnglish = Convert.ToString(CommonFunctions.ToObject(dr["NAME_ENGLISH"]));
			this.LegalPerson = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_PERSON"]));
			this.Mp = Convert.ToString(CommonFunctions.ToObject(dr["MP"]));
			this.Tel = Convert.ToString(CommonFunctions.ToObject(dr["TEL"]));
			this.Fax = Convert.ToString(CommonFunctions.ToObject(dr["FAX"]));
			this.Add = Convert.ToString(CommonFunctions.ToObject(dr["ADD"]));
			this.Pc = Convert.ToString(CommonFunctions.ToObject(dr["PC"]));
			this.Web = Convert.ToString(CommonFunctions.ToObject(dr["WEB"]));
			this.Email = Convert.ToString(CommonFunctions.ToObject(dr["EMAIL"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstCompanyTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_ID)); }
            set { SetData(MstCompanyTable.C_ID, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_CREATED_BY)); }
            set { SetData(MstCompanyTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(MstCompanyTable.C_CREATED_DATE)); }
            set { SetData(MstCompanyTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_UPDATED_BY)); }
            set { SetData(MstCompanyTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(MstCompanyTable.C_UPDATED_DATE)); }
            set { SetData(MstCompanyTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(MstCompanyTable.C_IS_ACTIVE)); }
            set { SetData(MstCompanyTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string CompanyCode
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_COMPANY_CODE)); }
            set { SetData(MstCompanyTable.C_COMPANY_CODE, value); }
        }
		
        [DataMember]
        public string Name
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_NAME)); }
            set { SetData(MstCompanyTable.C_NAME, value); }
        }
		
        [DataMember]
        public string NameEnglish
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_NAME_ENGLISH)); }
            set { SetData(MstCompanyTable.C_NAME_ENGLISH, value); }
        }
		
        [DataMember]
        public string LegalPerson
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_LEGAL_PERSON)); }
            set { SetData(MstCompanyTable.C_LEGAL_PERSON, value); }
        }
		
        [DataMember]
        public string Mp
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_MP)); }
            set { SetData(MstCompanyTable.C_MP, value); }
        }
		
        [DataMember]
        public string Tel
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_TEL)); }
            set { SetData(MstCompanyTable.C_TEL, value); }
        }
		
        [DataMember]
        public string Fax
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_FAX)); }
            set { SetData(MstCompanyTable.C_FAX, value); }
        }
		
        [DataMember]
        public string Add
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_ADD)); }
            set { SetData(MstCompanyTable.C_ADD, value); }
        }
		
        [DataMember]
        public string Pc
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_PC)); }
            set { SetData(MstCompanyTable.C_PC, value); }
        }
		
        [DataMember]
        public string Web
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_WEB)); }
            set { SetData(MstCompanyTable.C_WEB, value); }
        }
		
        [DataMember]
        public string Email
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_EMAIL)); }
            set { SetData(MstCompanyTable.C_EMAIL, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(MstCompanyTable.C_STATUS)); }
            set { SetData(MstCompanyTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

